home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Patchmix / Source / ImageController.m < prev    next >
Text File  |  1992-08-01  |  1KB  |  53 lines

  1. // Controller.m
  2. // By Jayson Adams, NeXT Developer Support Team
  3. // You may freely copy, distribute and reuse the code in this example.
  4. // NeXT disclaims any warranty of any kind, expressed or implied, as to its
  5. // fitness for any particular use.
  6. // Modified by Mara Helmuth for Patchmix.
  7.  
  8. #import <appkit/NXImage.h>
  9. #import <appkit/Application.h>
  10.  
  11. #import "PatchView.h"
  12. #import "PaletteView.h"
  13.  
  14. #import "ImageController.h"
  15.  
  16.  
  17. @implementation ImageController
  18.  
  19.  
  20. /* delegate methods */
  21.  
  22. - appDidInit:sender
  23. {
  24.     const char thePath[200];
  25.     const char sPath[200];
  26.     
  27.     sprintf(thePath,"%s/NewInst",NXHomeDirectory());      // default path: $HOME/NewInst
  28.     [instPath setStringValue:thePath];
  29.     [scorePath setStringValue:thePath];
  30.     sprintf(sPath,"%s/sf",NXHomeDirectory());      // default sound path: $HOME/sf
  31.     [sndPath setStringValue:sPath];
  32.     
  33.     /* stick images in the palette window for the user to drag */
  34.     [paletteView setImages];
  35.     
  36.     // initiate patchview images
  37.     [patchVw setImages];
  38.     
  39.     /* bring all the windows on screen */
  40.     [[patchVw window] makeKeyAndOrderFront:NULL];                // ACCEPT VIEW
  41.     [[paletteView window] makeKeyAndOrderFront:NULL];
  42.     
  43.     return self;
  44. }
  45.  
  46. - acceptedWindow:acceptView fromSource:source
  47. {
  48.     [[acceptView window] makeKeyAndOrderFront:NULL];
  49.     return self;
  50. }
  51.  
  52. @end
  53.